-- GENERATED SPELL FOR [Borgoth the Bloodletter] --


function spell0_16247(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(3148,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16247', 20268, 1)
end

function spell1_16247(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13445,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16247', 15000, 1)
end

function Sorts_16247(pUnit, Event)
local choix_sorts_16247 = math.random(0, 1)
if choix_sorts_16247 == 0 then
pUnit:RegisterEvent('spell0_16247', 1, 1)
end
if choix_sorts_16247 == 1 then
pUnit:RegisterEvent('spell1_16247', 1, 1)
end
end

function mob16247_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16247', math.random(1500, 3000), 1)
end

function mob16247_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16247_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16247_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16247, 1, 'mob16247_Action')
RegisterUnitEvent(16247, 2, 'mob16247_Leave')
RegisterUnitEvent(16247, 3, 'mob16247_Kill')
RegisterUnitEvent(16247, 4, 'mob16247_Die')
